package hwOne1;

import edu.princeton.cs.algs4.StdOut;

/**
 * 作业 1.1.20
 */
public class FactorialLog {
    public static double ln(int N) {
        if (N == 0 || N == 1) {
            return 0;
        }
        return Math.log(N) + ln(N - 1);
    }
    public static void main(String[] args)
    {
        for (int N = 0; N < 100; N++)
            StdOut.println(N + " " + ln(N));
    }
}
